package com.rsscollector.feedrss.parser;

import com.sun.syndication.feed.synd.SyndEntry;

public abstract class GenericParser {
    /**
     * Get image link if have
     *
     * @param content: content of rss feed
     * @param key
     *      www.tuoitre.com.vn=com.rsscollector.feedrss.parser.parserimpl.TuoiTreParser
     *      web.thanhnien.com.vn=com.rsscollector.feedrss.parser.parserimpl.ThanhNienParser
     *      www.dantri.com.vn=com.rsscollector.feedrss.parser.parserimpl.DanTriParser
     *      vnexpress.net=com.rsscollector.feedrss.parser.parserimpl.VnExpressParser
     * @param match: one element object, it is gotten from content and build to SyndEntry object
     * @return image link
     */
    public abstract String getImageLink(String content, String key, SyndEntry match);

    public String getTitle(String title) {
        return title;
    }
    public abstract StringBuffer getContent (String url);
}
